package com.hnair.bot.model;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author wx
 * @since 2018-04-28
 */
@TableName("cs_person")
public class CsPerson {

    /**
	 * 
	 */
//	private static final long serialVersionUID = 1L;

	/**
	 * 
	 */
    @TableId
	private Long id;

	/**
	 * 
	 */
	private String name;

	/**
	 * 
	 */
	private Double income;

	/**
	 * 1,是；2否；
	 */
	@TableField(value="is_friendly")
	private Boolean friendly;

	/**
	 * 
	 */
	@TableField(value="birth_day")
//	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date birthday;

	/**
	 * 
	 */
	private Integer age;



	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Double getIncome() {
		return income;
	}

	public void setIncome(Double income) {
		this.income = income;
	}

	public Boolean getFriendly() {
		return friendly;
	}

	public void setFriendly(Boolean Friendly) {
		this.friendly =Friendly;
	}

	
	public Date getBirthday() {
		return birthday;
	}

	public void setBirthday(String birthDay) throws Exception {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		this.birthday = sdf.parse(birthDay);
	}

	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	

	@Override
	public String toString() {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		return "CsPerson [id=" + id + ", name=" + name + ", income=" + income + ", Friendly=" + friendly
				+ ", birthday=" + sdf.format(birthday) + ", age=" + age + "]";
	}


	
}
